package org.xinjiang.tarim.travel.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.xinjiang.tarim.travel.model.Version;
import org.xinjiang.tarim.travel.service.VersionService;

@CrossOrigin
@RestController
@RequestMapping("/api")
public class VersionApi {
    @Autowired
    VersionService versionService;

    @RequestMapping("/get")
    public String getVersion(){
        Version version = versionService.selectByPrimaryKey(Long.valueOf(1));
        return version.getVersion();
    }
}
